package com.gsit.job.flows;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.springframework.stereotype.Component;

@Component
public class ExpKeywordsSearchFlow extends SearchFlow{
	
	protected void doSearch(){
		driver.get(searchCriteria.getUrl());
		
		String query = searchCriteria.getSearchQuery();
		String data [] =query.split("-");
		
		WebElement keywordElement = driver.findElement(By.name("anw"));
		keywordElement.sendKeys(data[0]);
		
		WebElement minExp = driver.findElement(By.name("mne"));
		minExp.sendKeys(data[1]);
		
		WebElement maxExp = driver.findElement(By.name("mxe"));
		maxExp.sendKeys(data[2]);
		

		driver.findElement(By.id("spnchknvd")).click();
		
		
		
		WebElement webElement = driver.findElement(By.id("search_submit"));
		webElement.submit(); 
		
		sleep(1000);
		
	}
	
	
	
	

}
